3.2.80 \(\int \frac {(d+e x^2) (a+b \log (c x^n))}{x^2} \, dx\) [180]

Optimal. Leaf size=44 \[ -\frac {b d n}{x}-b e n x-\frac {d \left (a+b \log \left (c x^n\right )\right )}{x}+e x \left (a+b \log \left (c x^n\right )\right ) \]

[Out]

-b*d*n/x-b*e*n*x-d*(a+b*ln(c*x^n))/x+e*x*(a+b*ln(c*x^n))

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {14, 2372} \begin {gather*} -\frac {d \left (a+b \log \left (c x^n\right )\right )}{x}+e x \left (a+b \log \left (c x^n\right )\right )-\frac {b d n}{x}-b e n x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((d + e*x^2)*(a + b*Log[c*x^n]))/x^2,x]

[Out]

-((b*d*n)/x) - b*e*n*x - (d*(a + b*Log[c*x^n]))/x + e*x*(a + b*Log[c*x^n])

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2372

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Dist[a + b*Log[c*x^n], u, x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]]
 /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

Rubi steps

\begin {align*} \int \frac {\left (d+e x^2\right ) \left (a+b \log \left (c x^n\right )\right )}{x^2} \, dx &=-\left (\frac {d}{x}-e x\right ) \left (a+b \log \left (c x^n\right )\right )-(b n) \int \left (e-\frac {d}{x^2}\right ) \, dx\\ &=-\frac {b d n}{x}-b e n x-\left (\frac {d}{x}-e x\right ) \left (a+b \log \left (c x^n\right )\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 49, normalized size = 1.11 \begin {gather*} -\frac {a d}{x}-\frac {b d n}{x}+a e x-b e n x-\frac {b d \log \left (c x^n\right )}{x}+b e x \log \left (c x^n\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x^2)*(a + b*Log[c*x^n]))/x^2,x]

[Out]

-((a*d)/x) - (b*d*n)/x + a*e*x - b*e*n*x - (b*d*Log[c*x^n])/x + b*e*x*Log[c*x^n]

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.05, size = 249, normalized size = 5.66

method result size
risch \(-\frac {b \left (-e \,x^{2}+d \right ) \ln \left (x^{n}\right )}{x}-\frac {i \pi b e \,x^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )-i \pi b e \,x^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-i \pi b e \,x^{2} \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+i \pi b e \,x^{2} \mathrm {csgn}\left (i c \,x^{n}\right )^{3}-i \pi b d \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )+i \pi b d \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+i \pi b d \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-i \pi b d \mathrm {csgn}\left (i c \,x^{n}\right )^{3}-2 \ln \left (c \right ) b e \,x^{2}+2 b e n \,x^{2}-2 a e \,x^{2}+2 d b \ln \left (c \right )+2 b d n +2 a d}{2 x}\) \(249\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x^2+d)*(a+b*ln(c*x^n))/x^2,x,method=_RETURNVERBOSE)

[Out]

-b*(-e*x^2+d)/x*ln(x^n)-1/2*(I*Pi*b*e*x^2*csgn(I*c)*csgn(I*x^n)*csgn(I*c*x^n)-I*Pi*b*e*x^2*csgn(I*c)*csgn(I*c*
x^n)^2-I*Pi*b*e*x^2*csgn(I*x^n)*csgn(I*c*x^n)^2+I*Pi*b*e*x^2*csgn(I*c*x^n)^3-I*Pi*b*d*csgn(I*c)*csgn(I*x^n)*cs
gn(I*c*x^n)+I*Pi*b*d*csgn(I*c)*csgn(I*c*x^n)^2+I*Pi*b*d*csgn(I*x^n)*csgn(I*c*x^n)^2-I*Pi*b*d*csgn(I*c*x^n)^3-2
*ln(c)*b*e*x^2+2*b*e*n*x^2-2*a*e*x^2+2*d*b*ln(c)+2*b*d*n+2*a*d)/x

________________________________________________________________________________________

Maxima [A]
time = 0.29, size = 52, normalized size = 1.18 \begin {gather*} -b n x e + b x e \log \left (c x^{n}\right ) + a x e - \frac {b d n}{x} - \frac {b d \log \left (c x^{n}\right )}{x} - \frac {a d}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x^2+d)*(a+b*log(c*x^n))/x^2,x, algorithm="maxima")

[Out]

-b*n*x*e + b*x*e*log(c*x^n) + a*x*e - b*d*n/x - b*d*log(c*x^n)/x - a*d/x

________________________________________________________________________________________

Fricas [A]
time = 0.40, size = 60, normalized size = 1.36 \begin {gather*} -\frac {{\left (b n - a\right )} x^{2} e + b d n + a d - {\left (b x^{2} e - b d\right )} \log \left (c\right ) - {\left (b n x^{2} e - b d n\right )} \log \left (x\right )}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x^2+d)*(a+b*log(c*x^n))/x^2,x, algorithm="fricas")

[Out]

-((b*n - a)*x^2*e + b*d*n + a*d - (b*x^2*e - b*d)*log(c) - (b*n*x^2*e - b*d*n)*log(x))/x

________________________________________________________________________________________

Sympy [A]
time = 0.23, size = 46, normalized size = 1.05 \begin {gather*} - \frac {a d}{x} + a e x - \frac {b d n}{x} - \frac {b d \log {\left (c x^{n} \right )}}{x} - b e n x + b e x \log {\left (c x^{n} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x**2+d)*(a+b*ln(c*x**n))/x**2,x)

[Out]

-a*d/x + a*e*x - b*d*n/x - b*d*log(c*x**n)/x - b*e*n*x + b*e*x*log(c*x**n)

________________________________________________________________________________________

Giac [A]
time = 5.74, size = 62, normalized size = 1.41 \begin {gather*} \frac {b n x^{2} e \log \left (x\right ) - b n x^{2} e + b x^{2} e \log \left (c\right ) + a x^{2} e - b d n \log \left (x\right ) - b d n - b d \log \left (c\right ) - a d}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x^2+d)*(a+b*log(c*x^n))/x^2,x, algorithm="giac")

[Out]

(b*n*x^2*e*log(x) - b*n*x^2*e + b*x^2*e*log(c) + a*x^2*e - b*d*n*log(x) - b*d*n - b*d*log(c) - a*d)/x

________________________________________________________________________________________

Mupad [B]
time = 3.34, size = 51, normalized size = 1.16 \begin {gather*} e\,x\,\left (a-b\,n\right )-\ln \left (c\,x^n\right )\,\left (\frac {b\,e\,x^2+b\,d}{x}-2\,b\,e\,x\right )-\frac {a\,d+b\,d\,n}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((d + e*x^2)*(a + b*log(c*x^n)))/x^2,x)

[Out]

e*x*(a - b*n) - log(c*x^n)*((b*d + b*e*x^2)/x - 2*b*e*x) - (a*d + b*d*n)/x

________________________________________________________________________________________